package com.qyt.hotel.dao;

import com.qyt.hotel.entity.Guest;
import com.qyt.hotel.entity.ResideState;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GuestMapper {
    List<Guest> getGuestList(@Param("guestName") String guestName, @Param("resideStateId") Integer resideStateId);

    List<ResideState> getResideStateList();

    List<String> getRoomIdList(@Param("roomTypeId") Integer roomTypeId, @Param("roomStateId") Integer roomStateId);

    Integer addGuest(@Param("guestName") String guestName, @Param("guestNum") Integer guestNum, @Param("identityId") String identityId, @Param("phone") String phone, @Param("resideDate") String resideDate, @Param("roomTypeId") Integer roomTypeId, @Param("roomId") String roomId, @Param("deposit") Double deposit);

    Integer updateRoomStateFree(@Param("roomId") String roomId);

    Integer updateRoomState(@Param("roomId") String roomId);

    Guest getOne(@Param("guestId") Integer guestId);

    Integer updateGuest(@Param("guestId") Integer guestId, @Param("guestName") String guestName, @Param("guestNum") Integer guestNum, @Param("identityId") String identityId, @Param("phone") String phone, @Param("resideDate") String resideDate, @Param("roomTypeId") Integer roomTypeId, @Param("roomId") String roomId, @Param("deposit") Double deposit);

    Integer updateOldRoomState(@Param("oldRoomId") String oldRoomId);

    void deleteGuest(@Param("guestId") Integer guestId);

    void checkout(@Param("guestId") Integer guestId, @Param("totalMoney") Double totalMoney, @Param("leaveDate") String leaveDate);
}
